﻿using System.Windows;
using DocumentFormat.OpenXml.Packaging;

namespace OpenPowerPoint.Slides
{
    /// <summary>
    /// Represents a single Slide Layout
    /// </summary>
    public class SlideLayout : BaseSlide
    {
        /// <summary>
        /// Generates a slide layout out of the slide layout part
        /// </summary>
        /// <param name="part">The part to load the layout from</param>
        /// <returns>A SlideLayout Instance according to the SlideLayoutPart</returns>
        public static SlideLayout Load(SlideLayoutPart part)
        {
            var ret = new SlideLayout();

            //Load content
            ret.LoadCommonSlideData(part.SlideLayout.CommonSlideData);
            return ret;
        }
    }
}
